<template>
  <div class="app">
    <h1 ref="title">你好</h1>
    <button @click="test">测试</button>
  </div>
  <Person ref="ren"/>
</template>

<script setup lang="ts" name="App">
  import Person from './components/Person.vue'
  import {ref} from 'vue'
  //数据
  let title = ref()
  let ren = ref()
  //方法
  function test(){
    console.log(title.value) //DOM标签
    console.log(ren.value)   //组件标签
  }
  
</script>


